Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove access() call from Snapsafe detection #2197

Merged
merged 10 commits into from
Feb 20, 2025

Conversation

smittals2
Copy link
Contributor

@smittals2 smittals2 commented Feb 15, 2025

Description of changes:

This change uses stat() instead of access() to check for the existence of the Sysgenid device. This is more accurate to ascertain whether the device exists on a machine. access() could fail for various other reasons such as missing permissions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@smittals2 smittals2 requested a review from a team as a code owner February 15, 2025 00:33
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.03%. Comparing base (7518c78) to head (b59de10).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
crypto/fipsmodule/rand/snapsafe_detect.c 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2197      +/-   ##
==========================================
- Coverage   79.04%   79.03%   -0.01%     
==========================================
  Files         612      612              
  Lines      106067   106218     +151     
  Branches    14985    15005      +20     
==========================================
+ Hits        83842    83953     +111     
- Misses      21571    21612      +41     
+ Partials      654      653       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

justsmth
justsmth previously approved these changes Feb 18, 2025
torben-hansen
torben-hansen previously approved these changes Feb 18, 2025
justsmth
justsmth previously approved these changes Feb 19, 2025
@justsmth justsmth self-requested a review February 19, 2025 13:08
@justsmth justsmth self-requested a review February 19, 2025 13:21
@smittals2 smittals2 dismissed stale reviews from justsmth and torben-hansen via f83eb44 February 19, 2025 22:41
@smittals2 smittals2 merged commit adc59f0 into aws:main Feb 20, 2025
117 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants